package com.orangecy.rulesubscribe.component;

import com.orangecy.common.context.OrangeCyContext;
import com.orangecy.rulesubscribe.define.RuleActuatorDTO;
import com.orangecy.rulesubscribe.define.RuleDefineDTO;
import com.orangecy.rulesubscribe.enums.RuleDimensionEnum;
import org.springframework.stereotype.Component;

/**
 * @Author : orangeCy.奕
 * @Product : 猎豹养成产品源码
 * @Time : 2021/10/26
 * @Desc :
 */
@Component
public class ItemSkuMaxSizeCheckerComponent extends AbstractRuleComponent{
    @Override
    RuleDimensionEnum dimension() {
        return RuleDimensionEnum.ITEM_CENTER_SPU;
    }

    @Override
    public RuleActuatorDTO execute(OrangeCyContext c, RuleDefineDTO ruleDefineDTO) {
        //mock 假设此规则成功 todo 从OrangeCyContext 获取参数
        return RuleActuatorDTO.ruleSuccess(ruleDefineDTO.getRuleCode(),ruleDefineDTO.getRuleName());
    }
}